import { DataTypes } from 'sequelize'
import { sequelize } from '../../BaseDao'

class ThirdCtgyModel {
  static createModel() {
    const model = sequelize.define(
      'thirdctgy',
      {
        thirdctgyid: {
          type: DataTypes.INTEGER,
          field: 'thirdctgyid',
          primaryKey: true,
          autoIncrement: true
        },
        thirdctgyname: {
          type: DataTypes.STRING,
          field: 'thirdctgyname',
          allowNull: false
        },
        secctgyid: {
          type: DataTypes.INTEGER,
          field: 'secctgyid',
          allowNull: true,
          defaultValue: null
        }
      },
      {
        timestamps: false
        // freezeTableName: true
      }
    )
    return model
  }
}

export const thirdCtgyModel = ThirdCtgyModel.createModel()
